from xtquant import xtdata
main_symbol = xtdata.get_main_contract('rb00.SF')
print(main_symbol)